import Vue from "vue";
import VueRouter from "vue-router";
import Login from '../views/login'
import Layout from '@/components/Layout.vue'
import Home from "../views/home"
import History from "../views/history"
import Monitor from "../views/monitor"
import System from "../views/system"
import User from "../views/user"
import Report from "../views/report"
import OneOfOne from "../views/report/main/1-1"
import OneOfTwo from "../views/report/main/1-2"
import OneOfTree from "../views/report/main/1-3"
import TwoOfOne from "../views/report/main/2-1"
import TwoOfTwo from "../views/report/main/2-2"
import TwoOfTree from "../views/report/main/2-3"
import TwoOfFour from "../views/report/main/2-4"
import TwoOfFiver from "../views/report/main/2-5"
import TreeOfOne from "../views/report/main/3-1"
import TreeOfTwo from "../views/report/main/3-2"
import FourOfOne from "../views/report/main/4-1"
import FourOfTwo from "../views/report/main/4-2"
import FourOfTree from "../views/report/main/4-3"
import FiveOfOne from "../views/report/main/5-1"
import FiveOfTwo from "../views/report/main/5-2"
import FiveOfTree from "../views/report/main/5-3"
import SixOfOne from "../views/report/main/6-1"
import SixOfTwo from "../views/report/main/6-2"
import SixOfTree from "../views/report/main/6-3"
import SevenOfOne from "../views/report/main/7-1"
import SevenOfTwo from "../views/report/main/7-2"
import EightOfOne from "../views/report/main/8-1"
import EightOfTwo from "../views/report/main/8-2"
import EightOfTree from "../views/report/main/8-3"
import EightOfFour from "../views/report/main/8-4"
import EightOfFive from "../views/report/main/8-5"
import EightOfSix from "../views/report/main/8-6"
import NightOfOne from "../views/report/main/9-1"
import NightOfTwo from "../views/report/main/9-2"
import TenOfOne from "../views/report/main/10-1"
import TenOfTwo from "../views/report/main/10-2"
import TenOfTree from "../views/report/main/10-3"
import ElevenOfOne from "../views/report/main/11-1"
import ElevenOfTwo from "../views/report/main/11-2"
import TwelveOfOne from "../views/report/main/12-1"
import TwelveOfTwo from "../views/report/main/12-2"
import ThirteenOfOne from "../views/report/main/13-1"
import ThirteenOfTwo from "../views/report/main/13-2"
import FourteenOfOne from "../views/report/main/14-1"
import FourteenOfTwo from "../views/report/main/14-2"
import FourteenOfTree from "../views/report/main/14-3"
import FifteenOfOne from "../views/report/main/15-1"
import FifteenOfTwo from "../views/report/main/15-2"
import FifteenOfTree from "../views/report/main/15-3"
import SixteenOfOne from "../views/report/main/16-1"
import SixteenOfTwo from "../views/report/main/16-2"
import SixteenOfTree from "../views/report/main/16-3"
import SeventeenOfOne from "../views/report/main/17-1"
import SeventeenOfTwo from "../views/report/main/17-2"
import SeventeenOfTree from "../views/report/main/17-3"
import EighteenOfOne from "../views/report/main/18-1"
import EighteenOfTwo from "../views/report/main/18-2"
import EighteenOfTree from "../views/report/main/18-3"
import EighteenOfFour from "../views/report/main/18-4"
import EighteenOfFive from "../views/report/main/18-5"
import EighteenOfSix from "../views/report/main/18-6"
import EighteenOfSeven from "../views/report/main/18-7"
import EighteenOfEight from "../views/report/main/18-8"
import EighteenOfNight from "../views/report/main/18-9"
import NineteenOfOne from "../views/report/main/19-1"
import NineteenOfTwo from "../views/report/main/19-2"
import TwentyOfOne from "../views/report/main/20-1"
import TwentyOfTwo from "../views/report/main/20-2"
import TwentyOfTree from "../views/report/main/20-3"
import TwentyoneOfOne from "../views/report/main/21-1"
import TwentyoneOfTwo from "../views/report/main/21-2"
import TwentyoneOfTree from "../views/report/main/21-3"
import TwentyoneOfFour from "../views/report/main/21-4"
import TwentyoneOfFive from "../views/report/main/21-5"
import TwentyoneOfSix from "../views/report/main/21-6"
import TwentytwoOfOne from "../views/report/main/22-1"
import TwentytwoOfTwo from "../views/report/main/22-2"
import TwentytwoOfTree from "../views/report/main/22-3"
import TwentytwoOfFour from "../views/report/main/22-4"
import TwentytwoOfFive from "../views/report/main/22-5"
import TwentytreeOfOne from "../views/report/main/23-1"
import TwentytreeOfTwo from "../views/report/main/23-2"
import TwentyfourOfOne from "../views/report/main/24-1"
import TwentyfourOfTwo from "../views/report/main/24-2"
import TwentyfourOfTree from "../views/report/main/24-3"
import TwentyfourOfFour from "../views/report/main/24-4"
import Car from "../views/user/main/car"
import Fleet from "../views/user/main/fleet"
import Users from "../views/user/main/user"
import CarList from "../views/carList"
import CompanyList from "../views/companyList"
import UserList from "../views/userList"
import EquipmentList from "../views/equipmentList"

Vue.use(VueRouter);

const routes = [
  // 登录
  {
    path: "/login",
    name: "login", //路由名称
    component: Login //组件对象
  },
  // 智慧看板
  {
    path: "/",
    component: Layout,
    redirect: '/home',
    children: [
      {
        path: 'home',
        component: Home
      }
    ]
  },
  // 实时监控
  {
    path: "/monitor",
    component: Layout,
    children: [
      {
        path: '/',
        component: Monitor
      }
    ]
  },
  // 历史回放
  {
    path: "/history",
    component: Layout,
    children: [
      {
        path: '/',
        component: History
      }
    ]
  },
  // 报表统计
  {
    path: "/report",
    component: Layout,
    children: [
      {
        path: '/',
        component: Report,
        redirect: '/report/1-1',
        children: [
          {
            path: '1-1',
            component: OneOfOne
          },
          {
            path: '1-2',
            component: OneOfTwo
          },
          {
            path: '1-3',
            component: OneOfTree
          },
          {
            path: '2-1',
            component: TwoOfOne
          },
          {
            path: '2-2',
            component: TwoOfTwo
          },
          {
            path: '2-3',
            component: TwoOfTree
          },
          {
            path: '2-4',
            component: TwoOfFour
          },
          {
            path: '2-5',
            component: TwoOfFiver
          },
          {
            path: '3-1',
            component: TreeOfOne
          },
          {
            path: '3-2',
            component: TreeOfTwo
          },
          {
            path: '4-1',
            component: FourOfOne
          },
          {
            path: '4-2',
            component: FourOfTwo
          },
          {
            path: '4-3',
            component: FourOfTree
          },
          {
            path: '5-1',
            component: FiveOfOne
          },
          {
            path: '5-2',
            component: FiveOfTwo
          },
          {
            path: '5-3',
            component: FiveOfTree
          },
          {
            path: '6-1',
            component: SixOfOne
          },
          {
            path: '6-2',
            component: SixOfTwo
          },
          {
            path: '6-3',
            component: SixOfTree
          },
          {
            path: '7-1',
            component: SevenOfOne
          },
          {
            path: '7-2',
            component: SevenOfTwo
          },
          {
            path: '8-1',
            component: EightOfOne
          },
          {
            path: '8-2',
            component: EightOfTwo
          },
          {
            path: '8-3',
            component: EightOfTree
          },
          {
            path: '8-4',
            component: EightOfFour
          },
          {
            path: '8-5',
            component: EightOfFive
          },
          {
            path: '8-6',
            component: EightOfSix
          },
          {
            path: '9-1',
            component: NightOfOne
          },
          {
            path: '9-2',
            component: NightOfTwo
          },
          {
            path: '10-1',
            component: TenOfOne
          },
          {
            path: '10-2',
            component: TenOfTwo
          },
          {
            path: '10-3',
            component: TenOfTree
          },
          {
            path: '11-1',
            component: ElevenOfOne
          },
          {
            path: '11-2',
            component: ElevenOfTwo
          },
          {
            path: '12-1',
            component: TwelveOfOne 
          },
          {
            path: '12-2',
            component: TwelveOfTwo
          },
          {
            path: '13-1',
            component: ThirteenOfOne
          },
          {
            path: '13-2',
            component: ThirteenOfTwo
          },
          {
            path: '14-1',
            component: FourteenOfOne
          },
          {
            path: '14-2',
            component: FourteenOfTwo
          },
          {
            path: '14-3',
            component: FourteenOfTree
          },
          {
            path: '15-1',
            component: FifteenOfOne
          },
          {
            path: '15-2',
            component: FifteenOfTwo
          },
          {
            path: '15-3',
            component: FifteenOfTree
          },
          {
            path: '16-1',
            component: SixteenOfOne
          },
          {
            path: '16-2',
            component: SixteenOfTwo
          },
          {
            path: '16-3',
            component: SixteenOfTree
          },
          {
            path: '17-1',
            component: SeventeenOfOne
          },
          {
            path: '17-2',
            component: SeventeenOfTwo
          },
          {
            path: '17-3',
            component: SeventeenOfTree
          },
          {
            path: '18-1',
            component: EighteenOfOne
          },
          {
            path: '18-2',
            component: EighteenOfTwo
          },
          {
            path: '18-3',
            component: EighteenOfTree
          },
          {
            path: '18-4',
            component: EighteenOfFour
          },
          {
            path: '18-5',
            component: EighteenOfFive
          },
          {
            path: '18-6',
            component: EighteenOfSix
          },
          {
            path: '18-7',
            component: EighteenOfSeven
          },
          {
            path: '18-8',
            component: EighteenOfEight
          },
          {
            path: '18-9',
            component: EighteenOfNight
          },
          {
            path: '19-1',
            component: NineteenOfOne
          },
          {
            path: '19-2',
            component: NineteenOfTwo
          },
          {
            path: '20-1',
            component: TwentyOfOne
          },
          {
            path: '20-2',
            component: TwentyOfTwo
          },
          {
            path: '20-3',
            component: TwentyOfTree
          },
          {
            path: '21-1',
            component: TwentyoneOfOne
          },
          {
            path: '21-2',
            component: TwentyoneOfTwo
          },
          {
            path: '21-3',
            component: TwentyoneOfTree
          },
          {
            path: '21-4',
            component: TwentyoneOfFour
          },
          {
            path: '21-5',
            component: TwentyoneOfFive
          },
          {
            path: '21-6',
            component: TwentyoneOfSix
          },
          {
            path: '22-1',
            component: TwentytwoOfOne
          },
          {
            path: '22-2',
            component: TwentytwoOfTwo
          },
          {
            path: '22-3',
            component: TwentytwoOfTree
          },
          {
            path: '22-4',
            component: TwentytwoOfFour
          },
          {
            path: '22-5',
            component: TwentytwoOfFive
          },
          {
            path: '23-1',
            component: TwentytreeOfOne
          },
          {
            path: '23-2',
            component: TwentytreeOfTwo
          },
          {
            path: '24-1',
            component: TwentyfourOfOne
          },
          {
            path: '24-2',
            component: TwentyfourOfTwo
          },
          {
            path: '24-3',
            component: TwentyfourOfTree
          },
          {
            path: '24-4',
            component: TwentyfourOfFour
          }
        ]
      }
    ]
  },
  // 运营管理
  {
    path: "/user",
    component: Layout,
    children: [
      {
        path: '/',
        component: User,
        redirect: '/user/car',
        children: [
          {
            path: 'car',
            component: Car
          },
          {
            path: 'fleet',
            component: Fleet
          },
          {
            path: 'users',
            component: Users
          }
        ]
      }
    ]
  },
  {
    path: "/system",
    component: Layout,
    children: [
      {
        path: '/',
        component: EquipmentList
      }
    ]
  }
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
